import {createStore} from "vuex"
import {getItem,setItem} from "../utils/storage"

const  store=createStore({
    state:{
        user:getItem("user"),
    },
    mutations:{
        setUser(state,data){
            state.user=data
           setItem("user", JSON.stringify(state.user))
        }
    }
})

export default store